<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
if($_RQ['op']=='main'){
	$setting=$this->plugin_setting('coupon');
	if($_RQ['status']==1){
		$status=1;
		$return['status']=1;
	}else{
		$status=0;
		$return['status']=0;
	}
	$list=$this->model('coupon')->getmycoupon($status);
	$return['list']=$list;
	$return['setting']=$setting;
	$return['coupon_wait']=model('jy_weishop/task')->pop_coupon_wait();
	$return['coupon_wait']=$return['coupon_wait']?$return['coupon_wait'][0]:false;
	if(!$return['coupon_wait']){
							$return['coupon_hd']=model('jy_weishop/task')->pop_coupon_hd();
							if(!$return['coupon_hd']){
								$return['game_wait']=model('jy_weishop/task')->pop_game();
							}
	}
	exi($return);
}
?>